import ElDeptTreeSelect from "@/components/start-boot/form/ElDeptTreeSelect";
import ElColumnTime from "@/components/start-boot/columns/ElColumnTime";
import ElCustomMap from "@/components/start-boot/columns/ElCustomMap";
import ElColumnInputTable from "@/components/start-boot/columns/ElColumnInputTable";
import ElColumnUpload from "@/components/start-boot/columns/ElColumnUpload";
const components = [
    ElDeptTreeSelect,
    ElColumnTime,
    ElColumnInputTable,
    ElCustomMap,
    ElColumnUpload
]
/**
 * 映射关系 表单组件名称=>列组件名称
 * {el-dept-tree-select: "el-column-dept", avue-time: "el-column-time"}
 *
 * @type {{}}
 */
const tableColumnMapper = {};
components.map(e => {
    let columnTemp = null;
    let formTemp = null;
    if (e.columnComponents) {
        formTemp = e.name;
        columnTemp = e.columnComponents
    } else {
        formTemp = e.formComponents;
        columnTemp = e.name
    }
    if (tableColumnMapper[formTemp]) {
        return true
    }
    if (!columnTemp) return true;
    tableColumnMapper[formTemp] = columnTemp
})
export default tableColumnMapper

